<%@ page import="org.apache.commons.lang.StringUtils" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>天猫注册</title>
    <link rel="icon" href="https://g.alicdn.com/mui/global/1.2.35/file/favicon.ico"/>
    <link rel="stylesheet" href="static/css/public.css">
    <link rel="stylesheet" href="static/css/user/reg.css">
    <script src="/static/js/frame/jquery-3.5.1.min.js"></script>
    <script src="/static/js/frame/totoro-utils.js"></script>
    <script src="${pageContext.request.contextPath}/static/js/self/user/usercheck.js" charset="UTF-8"></script>
    <%
        String t = request.getParameter("t");
        // 如果路径格式不对：被用户改过，则跳转404
        if(!(t.substring(0,1).equals("0") || t.substring(0,1).equals("1"))){
            response.sendRedirect("404.html");
        }
        String action = t.substring(0,1);
        String info = (String) session.getAttribute(t);
        if(StringUtils.isEmpty(info)){
            response.sendRedirect("register_01_mobile.html");
        }
        pageContext.setAttribute("info", info);
        pageContext.setAttribute("action", action);
    %>
</head>
<body>
<%--注册界面共同的头部(样式不同)--%>
<div class="primary-box page">
    <div class="steps">
        <ol>
            <li class="active">
                <i>1</i>
                <span>设置用户名</span>
            </li>
            <li class="active">
                <i>2</i>
                <span>填写账号信息</span>
            </li>
            <li>
                <i class="icon-font">&#10004</i>
                <span>注册成功</span>
            </li>
        </ol>
    </div>
    <%--------------------------%>
    <%-- 身体 --%>
    <div class="content">
        <div class="form-main-list form-list">
            <form id="vip-submit" action="${pageContext.request.contextPath}/register/register.htm" method="post">
                <input type="hidden" name="type" value="${action}">
                <input type="hidden" name="phone" value="${info}">
                <div class="form-group">
                    <div class="form-item">
                        <span class="form-value font-b">登录名</span>
                        ${info}&nbsp;
                    </div>
                </div>
                <div class="form-group">
                    <div class="form-item">
                        <span class="form-value font-b">请设置登录密码</span>
                        登录时验证，保护账号信息
                    </div>
                    <div class="form-item" style="position: relative;">
                        <span class="form-value">登录密码</span>
                        <input class="form-text" placeholder="设置你的登录密码" type="password" id="pwd">
                        <span id="pwd-error" style="display: none; margin-left: 4px;"><i class="image-icon"></i><i class="error-text">密码设置不符合要求</i><i class="error-text"></i></span>
                        <div class="ts-tip" style="position: absolute; left: 485px; top:-39px; display: none; font: 12px/1.5 tahoma, arial, 'Hiragino Sans GB', \5b8b\4f53, sans-serif;">
                            <i class="ts-tip-ic"></i>
                            <div class="ts-tip-bd">
                                <div class="ts-strength">
                                    <span>强度</span>
                                    <div class="ts-strength-bar">
                                        <span></span>
                                        <span></span>
                                        <span></span>
                                        <em></em>
                                    </div>
                                </div>
                                <div class="ts-rule">
                                    <div class="ts-rule-item ts-rule-length">
                                        <i class="ordinary-icon"></i>
                                        <span>6~20个字符</span>
                                    </div>
                                    <div class="ts-rule-item ts-rule-legal">
                                        <i class="ordinary-icon"></i>
                                        <span>只能包含字母、数字以及标点符号（除空格）</span>
                                    </div>
                                    <div class="ts-rule-item ts-rule-multi">
                                        <i class="ordinary-icon ts-rule-multi"></i>
                                        <span>字母、数字和标点符号至少包含2种</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="form-item">
                        <span class="form-value">密码确认</span>
                        <input class="form-text" placeholder="请再次输入你的密码" type="password" id="pwd2" name="password">
                        <span id="pwd-error2" style="display: none; margin-left: 4px;"><i class="image-icon msg-icon"></i><i class="error-text" style="color: black">请再次输入你的密码</i></span>
                    </div>
                    <div class="form-item">
                        <span class="form-value">支付密码</span>
                        <input class="form-text" placeholder="请输入你的支付密码" type="password" id="payPassword" name="payPassword" maxlength="6">
                        <span id="pay-error" style="display: none; margin-left: 4px;">
                            <i class="image-icon msg-icon"></i>
                            <i class="error-text" style="color: black">请输入你的支付密码</i>
                        </span>
                    </div>
                </div>
                <div class="form-group">
                    <div class="form-item">
                        <span class="form-value font-b">设置会员名</span>
                        &nbsp;
                    </div>
                    <div class="form-item">
                        <span class="form-value">登录名</span>
                        <input class="form-text" placeholder="会员名一旦设置成功，无法修改" type="text" id="vip" name="vipName">
                        <div id="vip-error" style="display: none; margin: -30px 0 0 4px;"><i class="image-icon msg-icon"></i><i class="error-text" style="color: black">简易会员名使用简体中文，方便好记</i></div>
                        <div class="nick-suggest-container">
                            <div class="suggest-container" style="display: none">
                                <ul id="new-name">
                                    <li style="font-weight: 700; cursor: text">推荐使用：</li>
                                    <li></li>
                                    <li></li>
                                    <li></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <br/>
                    <div class="form-item" style="margin-top: 10px">
                        <button class="form-submit" id="rsbmt">提交</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>
